//
//  FalgUrlViewController.m
//  Hxcsfw
//
//  Created by 企友软mac on 2018/4/27.
//  Copyright © 2018年 企友软mac. All rights reserved.
//

#import "FalgUrlViewController.h"

@interface FalgUrlViewController ()

@property (weak, nonatomic) IBOutlet UITextField *textFlagUrl;

@end

@implementation FalgUrlViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _textFlagUrl.text = PCDebugURL;
    NSString *strUrl = [WShareUtil getDataWithUserDefaultsForKey:@"DEBUGURL"];
    if ([WShareUtil strNilOrEmpty:strUrl]) {
        [WShareUtil saveDataWithUserDefaultsSetObject:_textFlagUrl.text ForKey:@"DEBUGURL"];
    }else {
        _textFlagUrl.text = strUrl;
    }
}

- (IBAction)btnClick:(UIButton *)sender {
    if (_textFlagUrl.text.length > 0) {
        [WShareUtil removeDataWithUserDefaultsForKey:@"DEBUGURL"];
        [WShareUtil saveDataWithUserDefaultsSetObject:_textFlagUrl.text ForKey:@"DEBUGURL"];
    }
}

@end
